import React from 'react';
import { Route, Link } from 'react-router-dom';
import Router1 from './router-3-1';
import Router2 from './router-3-2';
export default function test1(props) {
  console.log('props.subRoute:', props.subRoute);
  return (
    <div>
      二级路由Home/test1:
      <br />
      test1
      <br />
      test1
      <br />
      test1
      <br />
      test1
      <br />
      test1
      <br />
      test1
      <br />
      test1
      <>&nbsp;</>
      <>&nbsp;</>
      <>&nbsp;</>
      <>&nbsp;</>
      <>&nbsp;</>
      三级路由：router-3
      <br />
      <Link to="/home/test1/router1">router-3-1,这里也是遍历路由表渲染的</Link>
      {/* <Route path="/home/test1/router1" component={Router1}></Route> */}
      {props.subRoute.map((item) => {
        return <Route path={item.path} key={item.path} component={item.component}></Route>;
      })}
    </div>
  );
}
